import request from '../request.js'

// 搜索数据
export function Search(params) {
    return new Promise((resolve, reject)=>{
        request.post("/api/page/search", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}
// 搜索记录
export function getSearchlog(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/page/searchlog", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}
// 清空搜索
export function deleteSearch(params) {
    return new Promise((resolve, reject)=>{
        request.get("/api/page/deleteSearch", params).then((result)=>{
            resolve(result)
        }).catch(err=>{
            reject(err)
        });
    });
}